﻿@{
    if (GimsMembership.IsLogin)
    {
        var sMessage = new KPIS.GERP.WEB.GIMS.SysMessageService.SysMessageServiceClient();
        int unreadCount;
        int unwarnCount = sMessage.GetSendUnwarnUnreadCount(GimsMembership.CurrentEmpId, out unreadCount);
        ViewBag.UnWarnCount = unwarnCount;
        ViewBag.UnReadCount = unreadCount;
    }
    else
    {
        try
        {
            HttpContext.Current.Response.Redirect("~/Home/Login"); 
        }
        catch { }
        return;
    }
    var menuItemsList = SiteMenuUtility.GetMenu().ToList(); 
}
<!DOCTYPE html>
<html lang="th">
<head>
	<meta charset="utf-8" />
	<title>@ViewBag.Title - @GimsConfigReader.SystemName [GIMS] </title>
	<meta name="description" content="@ViewBag.Descr" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<link href="~/Content/Images/Icon/KPIS logo.ico" rel="shortcut icon" type="image/x-icon" />
	@Html.Partial("_CSS")
    @RenderSection("pageSpecificPluginStyles", false)
</head>
  <body style="font-family: tahoma;"> <!-- style="font-family:'Open Sans'"> -->
    @Html.Partial("_Header")
	<div class="container-fluid" id="main-container">
		<a id="menu-toggler" href="#"><span></span></a>
        @Html.Partial("_Menu", menuItemsList)
		<div id="main-content" class="clearfix">
			<div id="breadcrumbs">
                @Html.Partial("_SiteNavigate", menuItemsList)
                 @Html.Partial("_SearchBox") 
			</div>
			<div id="page-content" class="clearfix">
				@Html.Partial("_ContentHeader")
                <div class="row-fluid">
                    @RenderBody()
                </div>
			</div>
		</div>
    </div> 

    @Html.Partial("_ModalMessage") 
     
    <a href="#" id="btn-scroll-up" class="btn btn-small btn-inverse">
		<i class="icon-double-angle-up icon-only bigger-110"></i>
	</a>
	@Html.Partial("_JS")
	@RenderSection("pageSpecificPluginScripts", false)
	@RenderSection("scripts", false)
	@Html.Partial("_LayoutScript")
</body>
</html>